package com.hhk.spring_boot_study.controller;

import com.sun.applet2.AppletParameters;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class HelloWorld {

    @ResponseBody
    @RequestMapping("/hello")
    public String hello(){
        return "Hello world!";
    }

//    查出用户数据，展示在页面
    @RequestMapping("success")
    public String success(Map<String,Object> map){
        map.put("hello","你好");
        map.put("data","数据源");
        return "success";
    }
}
